package com.jxstyle.core.response;

import com.jxstyle.core.exception.BizException;
import com.jxstyle.core.exception.BizExceptionEnum;

@SuppressWarnings("rawtypes")
public class ErrorResponse extends Response {

	private String errorMsg;

	public ErrorResponse(int code) {
		super.setCode(code);
	}

	public ErrorResponse(int code, String errorMsg) {
		super.setCode(code);
		this.errorMsg = errorMsg;
	}

	public ErrorResponse(BizException bizException) {
		super.setCode(bizException.getCode());
		this.errorMsg = bizException.getMessage();
	}

	public ErrorResponse(BizExceptionEnum bizExceptionEnum) {
		super.setCode(bizExceptionEnum.getCode());
		this.errorMsg = bizExceptionEnum.getMessage();
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
}
